#include<stdio.h>
#include<string.h>

void count(char c[])
{
	int key,sum1=0,sum2=0;
	int len=strlen(c);
	for(key=0;key<len;key++)
	{
		if(c[key]>='0'&&c[key]<='9') sum1++;
		if(c[key]>='a'&&c[key]<='z') sum2++;
		if(c[key]>='A'&&c[key]<='Z') sum2++;
	}
	printf("%d,%d",sum2,sum1);
}
int main()
{
	char c[100];
	gets(c);
	count(c);
	return 0;
} 
